package com.example.entity;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.Builder;
import java.time.LocalDate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "interface_traffic_record_day")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class InterfaceTrafficRecordDay {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(name = "interface_name", nullable = false, length = 255)
    private String interfaceName;

    @Column(name = "request_count", nullable = false)
    private Integer requestCount;

    @Column(name = "record_type", nullable = false)
    private Integer recordType; // 修改为 Integer 类型

    @Column(name = "record_time", nullable = false)
    private LocalDate recordTime;

    @Column(name = "public_id")
    private Long publicId;

    @Column(name = "client_id", nullable = false, length = 64)
    private String clientId;
}
